//
//  ListView.h
//  IYoker_Organization
//
//  Created by chunjian Dai on 15/12/24.
//  Copyright © 2015年 wangguimin. All rights reserved.
//

#import <UIKit/UIKit.h>

@class ListView;
@protocol ListViewDelegate <NSObject>
@optional
- (void)listView:(ListView *)listView
           index:(NSInteger)index;
- (void)dismissListView:(ListView *)listView;

- (void)footerActionWithListView:(ListView *)listView;
@end
@interface ListView : UIView
@property (nonatomic,assign) id<ListViewDelegate> delegate;
@property (nonatomic,strong) UITableView *tableView;
@property (nonatomic,strong) NSMutableArray *dataSource;
@property (nonatomic,assign) CGFloat y;
@property (nonatomic,assign) CGFloat x;
@property (nonatomic,assign) CGFloat width;
@property (nonatomic,strong) UIColor *bgColor;//    背景色
@property (nonatomic,assign) CGFloat bgAlpha;// 透明度
@property (nonatomic,assign) CGFloat rowHeight;//   表格的行高
@property (nonatomic,copy) NSString *key;

@property (nonatomic,strong) MJRefreshBackNormalFooter *footer;

+ (id)defaultView;
+ (id)defaultViewWithOffset_Y:(CGFloat)y;

- (id)initWithOffset_Y:(CGFloat)y;
- (void)reloadData;
- (void)reloadDataWithOffset_X:(CGFloat)x
                      offset_y:(CGFloat)y
                         width:(CGFloat)width
                    dataSource:(NSMutableArray *)dataSource
                           key:(NSString *)key;
- (void)endRefresh;
- (void)dissmiss;
@end
